package com.spring.demo02;

public class Cliect {
    public static void main(String[] args) {
        //真实
        Host host = new Host();

        //代理角色
        ProxyInvocationHandler pih = new ProxyInvocationHandler();

        //通过调用程序处理角色我们需要调用的接口
        pih.setRent(host);

        Rent proxy = (Rent) pih.getProxy();

        proxy.rent();

    }
}
